package com.org.javabody.classapi;

/**
 * Created by admin on 2017/4/30.
 */
public class ClassDemo {
    private int a=1;
    private int b=1;

    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }

    public int getB() {
        return b;
    }

    public void setB(int b) {
        this.b = b;
    }

    public ClassDemo(){
        System.out.println("默认构造方法");
    }
    public ClassDemo(int a, int b){
        this.a = a;
        this.b = b;
        System.out.println("有参构造方法");
    }

    public void print(int a, int b){
        System.out.print(a+b);
    }
    public void print(){
        System.out.print(a+b);
    }
}
